export default {
	set(item, val) {
		if (typeof val != 'string') {
			val = JSON.stringify(val)
		}
		uni.setStorage({
			key: item,
			data: val,
			success: function() {}
		});
	},
	get(item) {
		let data;
		try {
			data = uni.getStorageSync(item);
			
		} catch (e) {
			// error
		}
		return data
	},
	remove(item) {
		uni.removeStorage({
			key: item,
			success: function(res) {

			}
		});
	}
}
